package com.gallsoft.games.bennyadv;

import com.gallsoft.games.framework.gamedev2d.DynamicGameObject;
import com.gallsoft.games.framework.gl.TextureRegion;
import com.gallsoft.games.framework.math.Rectangle;
import com.gallsoft.games.framework.math.Vector2;

public class Platform extends DynamicGameObject {

    //public static final float PLATFORM_WIDTH = 2;
    public static final float PLATFORM_WIDTH = 1.0f;
    public static final float PLATFORM_HEIGHT = 1.0f;
    public static final int PLATFORM_TYPE_STATIC = 0;
    public static final int PLATFORM_TYPE_MOVING = 1;
    public static final int PLATFORM_TYPE_SOLID = 2;
    public static final int PLATFORM_STATE_NORMAL = 0;
    public static final int PLATFORM_STATE_PULVERIZING = 1;
    public static final float PLATFORM_PULVERIZE_TIME = 0.2f * 4;
    public static final float PLATFORM_VELOCITY = 2;
    
    public static final int GRASS = 1;
    public static final int GRASS_GROUND = 2;
    

    int type;
    int style;
    int state;
    float stateTime, width, height, angle;
    boolean flip;
    TextureRegion platformGraphic;

    public Platform(int type, float x, float y, TextureRegion platformGraphic, boolean isFlipped, float angle) {
        super(x, y, PLATFORM_WIDTH, PLATFORM_HEIGHT);

        this.type = type;
        this.platformGraphic = platformGraphic;
        this.state = PLATFORM_STATE_NORMAL;
        this.stateTime = 0;
        this.flip = isFlipped;
        this.width = 1.0f;
        this.height = 1.0f;
        this.velocity.x = 0.0f;
        this.velocity.y = 0.0f;
        this.angle = angle;
    }

    public void update(float deltaTime) {
    }

    /*
    public void adjustBoundsX(float adjust) {
        float boundsX = bounds.lowerLeft.x + adjust;
        float boundsY = bounds.lowerLeft.y;
        bounds.lowerLeft.set(boundsX, boundsY);
        bounds.width = bounds.width - adjust;
    }
    
    public void adjustBoundsWidth(float adjust) {
        bounds.width = bounds.width - adjust;
    }
    */
}
